/**
 * Created by hengyu on 2019/1/10.
 */
var mapApp=new Object();
mapApp.cesiumMap=new Object();
function onload(Cesium) {

    var viewer= new Cesium.Viewer('cesiumContainer',{
        geocoder : true ,//需开启地理编码
        selectionIndicator: false,
        infoBox: false,
        shadows : true
    });
    //加载arcgis影像底图
    var esri = new Cesium.ArcGisMapServerImageryProvider({
        url : 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
    });
    viewer.imageryLayers.addImageryProvider(esri);


    //天地图中文注记
    var zhuji=new Cesium.WebMapTileServiceImageryProvider({
        url:"http://t2.tianditu.com/cia_w/wmts?service=WMTS&tk=01ca247bd6af0c025bd16ba8778b602b",
        request: 'GetTile',
        layer: 'cia',
        style: 'default',
        format: 'tiles',
        tileMatrixSetID : 'w',
        tilematrix: 12

    });
    viewer.imageryLayers.addImageryProvider(zhuji);


    mapApp.cesiumMap.viewer=viewer;
    viewer.geocoder.viewModel.geoKey = 'fvV2osxwuZWlY0wJb8FEb2i5';
    addLayers(Cesium);
    addShandongProvince();

    addfeiyiPosition();

    $('#loadingbar').remove();
}
